1. Field of the Invention
The present invention relates to a musical sound generation device, a musical sound method, and a storage medium.
2. Related Art
A musical sound generation device is conventionally known that stores sampled waveform data and reads the data to generate musical sound of a variety of frequencies.
For example, Japanese Unexamined Patent Application, Publication No. 2003-157082 describes technology in which data of a waveform encoded by PCM (Pulse Coded Modulation) is read by time division as a sound source data, for respective time slots of respective channels in one sample cycle, to synthesize and generate musical sounds of a plurality of channels.
In technology described in Japanese Unexamined Patent Application, Publication No. 2003-157082, a process is repeated in which waveform data is read from memory, in time slots of respective channels, and musical sound is synthesized and outputted.
However, conventional musical sound generation devices, including the technology described in Japanese Unexamined Patent Application, Publication No. 2003-157082, may be configured to have a shared memory in which the memory storing the waveform data is shared with another application, due to cost reduction demands.
In a case in which the memory storing the waveform data is shared, there may be an increase in the probability of collisions with regard to access to memory by plural processes, resulting in access to memory being made to wait, and leading to delays in processing.
In particular, in a case of an increase in the number of musical channels that can be simultaneously generated, this type of situation becomes conspicuous.
In this way, in a conventional musical sound generation device, processing efficiency for generating musical sound has not been sufficiently high.
Then, the following technology is described in Japanese Patent Application No. 2012-052616 in order to raise the processing efficiency for generating musical sound in a musical sound generation device. A technology is described that, for each channel where sound generation is made, generates entry data indicating a read address in memory, stores it temporarily in a memory interface, and reads sample data of waveforms for a predetermined number of channels from the memory based on an empty state of the entry data and a bus.
However, with the technology described in Japanese Patent Application No. 2012-052616, there may be a case in which the load on the bus increases so that access more than the memory band occurs, due to exceeding the upper limit of the amount of data of the entry data that can be processed, for example. In such a case, data of waveforms necessary until the time of starting waveform generation processing at a sound source unit cannot be received, a result of which a sound is generated that is different from the sound which is requested for sound generation.